package client;

import gui.MainWindow;
import java.awt.EventQueue;
import network.Connector;

public class Launcher {

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		
		final Connector connector = new Connector();
		
		final MainWindow window = new MainWindow();
		
		window.setConnector(connector);
		connector.setWindow(window);
		
		/**
		 * EventQueue permet de ne pas avoir de problème de synchro sur l'UI
		 */
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					window.initialize();
				} catch (Exception e) {
					System.out.println(e.getMessage());
				}
			}
		});
	}
}
